package com.ocm.core.dto;

import com.googlecode.simpleobjectassembler.annotation.EntityDto;

@EntityDto(id = "id")
public class PropertyDefinitionDto {

   private Long id;

   private String name;

   private String displayName;

   private Integer maxlength;

   private Boolean multiValue;

   private String description;

   private Integer propertyType;

   private Long version;

   private Integer status;

   private Boolean isHidden;

   private Boolean readOnly;

   private Boolean editable;

   private String defaultValue;

   private String objectConfig;

   public PropertyDefinitionDto() {
      this.isHidden = false;
      this.readOnly = false;
      this.editable = false;
   }

   public Long getId() {
      return id;
   }

   public void setId(Long id) {
      this.id = id;
   }

   public String getName() {
      return name;
   }

   public void setName(String name) {
      this.name = name;
   }

   public String getDescription() {
      return description;
   }

   public void setDescription(String description) {
      this.description = description;
   }

   public Integer getPropertyType() {
      return propertyType;
   }

   public void setPropertyType(Integer propertyType) {
      this.propertyType = propertyType;
   }

   public Integer getStatus() {
      return status;
   }

   public void setStatus(Integer status) {
      this.status = status;
   }

   public String getDisplayName() {
      return displayName;
   }

   public void setDisplayName(String displayName) {
      this.displayName = displayName;
   }

   public Integer getMaxlength() {
      return maxlength;
   }

   public void setMaxlength(Integer maxlength) {
      this.maxlength = maxlength;
   }

   public Boolean getMultiValue() {
      return multiValue;
   }

   public void setMultiValue(Boolean multiValue) {
      this.multiValue = multiValue;
   }

   public Long getVersion() {
      return version;
   }

   public void setVersion(Long version) {
      this.version = version;
   }

   public Boolean getIsHidden() {
      return isHidden;
   }

   public void setIsHidden(Boolean isHidden) {
      this.isHidden = isHidden;
   }

   public Boolean getReadOnly() {
      return readOnly;
   }

   public void setReadOnly(Boolean readOnly) {
      this.readOnly = readOnly;
   }

   public String getDefaultValue() {
      return defaultValue;
   }

   public void setDefaultValue(String defaultValue) {
      this.defaultValue = defaultValue;
   }

   public Boolean getEditable() {
      return editable;
   }

   public void setEditable(Boolean editable) {
      this.editable = editable;
   }

   public String getObjectConfig() {
      return objectConfig;
   }

   public void setObjectConfig(String objectConfig) {
      this.objectConfig = objectConfig;
   }

   @Override
   public boolean equals(Object obj) {
      PropertyDefinitionDto propertyCompare = (PropertyDefinitionDto) obj;
      if (this.getId().longValue() == propertyCompare.getId().longValue()) {
         return true;
      }
      return false;
   }
}
